import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
					path: '/',
					redirect: '/dealt'
        },
        {
					path: '/',
					component: () => import(/* webpackChunkName: "home" */ '@/components/common/Home.vue'),
					meta: { title: '自述文件' },
					children: [
							{
								path: '/dealt',
								component: () => import(/* webpackChunkName: "query" */ '@/components/page/be_dealt_order.vue'),
								meta: { title: '待办工单' }
							},
							{
								path: '/init',
								component: () => import(/* webpackChunkName: "query" */ '@/components/page/initiate_form.vue'),
								meta: { title: '新建申请' }
							},
							{
								path: '/done',
								component: () => import(/* webpackChunkName: "query" */ '@/components/page/already_done_order.vue'),
								meta: { title: '已办工单' }
							},
							{
								path: '/initiated',
								component: () => import(/* webpackChunkName: "query" */ '@/components/page/initiated_orders'),
								meta: { title: '在途工单' }
							},
            ]
        },
			{
				path: '/login',
				component: () => import(/* webpackChunkName: "login" */ '@/components/page/Login.vue'),
				meta: { title: '登录' }
			},
    ]
});
